coreVersion: v1
kind: Item
includeTemplates:
  - default
metadata:
  name: identity
  displayName: Identity
  pluralName: identities
  displayPluralName: Identities
  titleAttribute: name
  dataSource: main
  tableName: sec_identities
  description: Identities
  core: true
  performDdl: false
  icon: IdcardOutlined
spec:
  attributes:
    name:
      type: string
      columnName: name
      displayName: Name
      description: Name
      required: true
      unique: true
      length: 50
      colWidth: 200
    principal:
      type: bool
      columnName: principal
      displayName: Principal
      description: Principal
      required: true
      defaultValue: false
    accesses:
      type: relation
      relType: oneToMany
      target: access
      mappedBy: target
      displayName: Accesses
      description: Accesses
  indexes:
    sec_identities_name_principal_uk:
      columns:
        - name
        - principal
      unique: true
